BEGIN;

--SELECT AsText(ponto), srid FROM poi;

SELECT *
FROM poi
WHERE Contains('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))', ponto) AND tipo IS NOT NULL;

--SELECT * FROM avaliacao WHERE valor > 0;
--
--SELECT AsText(ponto), srid, nome, endereco, dono, tipo, descricao, telefone FROM poi WHERE tipo IS NOT NULL AND distance('POINT(0.0 0.0)', ponto) < 10000;

END;